package cal

import (
	"idle/internal/game/attr"
	"idle/internal/game/hero"
)

type MagicDamageBonusAttrCal struct {
}

func (c *MagicDamageBonusAttrCal) Cal(h *hero.Hero) {
	eng := h.GetAttr(attr.Eng)
	value := eng / 10
	h.SetAttr(attr.MagicDamageBonus, value)
}

func (c *MagicDamageBonusAttrCal) AssociatedAttr() []attr.Attribute {
	return []attr.Attribute{attr.Eng}
}
